<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>我的分享</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/css.css"/>
    <style>


        [v-cloak] {
            display: none;
        }

        .shareewmbody {
            position: fixed;
            width: 100%;
            height: 100%;
            background: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: flex-start;
        }

        .shareewm {
            width: 300px;
            /*height: 300px;*/
            background: rgba(255, 255, 255, 1);
            box-shadow: 0px 10px 20px 0px rgba(7, 108, 224, 0.2);
            border-radius: 4px;
            display: flex;
            justify-content: flex-start;
            align-items: center;
            flex-direction: column;
            margin-top: 100px;
            position: absolute;
            padding-bottom: 20px;
        }
        .shareewm .touxiang{
            width: 100px;
            height: 100px;
            position: relative;
            top: -50px;
            border-radius: 50%;
        }
        .shareewm .erweima{
            width: 140px;
            /*height: 140px;*/
        }
        .shareewm p{
            font-size:15px;
            font-family:MicrosoftYaHei;
            font-weight:bold;
            color:rgba(119,119,119,1);
            line-height:42px;
            margin-top: -40px;
            margin-bottom: 10px;
        }
        .erweima{
            width: 80%;
            display: block;
            margin: auto;
            padding-top: 0px;
            margin-top: 20px;
        }
    </style>
</head>

<body>
<div id="wrap" class="flex-wrap flex-vertical">
    <header>
        <ul>
            <li class="active">
                <i onclick="back()" class="icon iconfont icon-back"></i>
                <span>在线客服</span>
            </li>
        </ul>
    </header>
    <div class="shareewmbody fixed-header">
        <img class="erweima" :src="erweima|filtersImg" alt="">
        <!--<div class="shareewm">-->
            <!--&lt;!&ndash;<img class="touxiang" :src="avatar|filtersImg" alt="">&ndash;&gt;-->
            <!--&lt;!&ndash;<p>成功推荐一名会员获10元现金</p>&ndash;&gt;-->
            <!---->
        <!--</div>-->
    </div>
</div>
</body>

</html>
<script src="../../aui/js/aui.js"></script>
<script src="../../script/vue2.js"></script>
<script src="../../script/vue-resource.min.js"></script>
<script src="../../script/common.js"></script>
<script>
    var vm = new Vue({
        el: "#wrap",
        data: {
            userinfo: [],
            editAddress: false,
            userinfo2: [],
            bio: '',
            sfz: '',
            card: '',
            avatar: '',
            nickname: '',
            mobile: '',
            checked: 0,
            release: false,
            title: '我的分享',
            category: [],
            categoryactive: 11,
            list: [],
            page: 1,
            loading: false, //控制上拉加载的加载动画
            finished: false, //控制在页面往下移动到底部时是否调用接口获取数据
            isLoading: false, //控制下拉刷新的加载动画
            erweima:''
        },
        mounted: function () {
            var that = this;
            apiready = function () {
                // that.getCategory()
                that.gettouxiang()
                that.getList(1)
            };
        },
        methods: {
            toLogin: function () {
                if (api.systemType == "ios") {
                    var times = 0;
                } else {
                    var times = 300;
                }
                api.openWin({ //未登录打开登陆窗口
                    name: 'login',
                    url: '../login/login.html',
                    delay: 0,
                    slidBackType: 'edge',
                    vScrollBarEnabled: false,
                    slidBackEnabled: false,
                })
            },
            gettouxiang:function(){
                var that = this;
                // that.avatar = $api.getStorage('userInfo').avatar
            },
            getList: function (type) {
                var that = this;
                showProgress();
                var token = $api.getStorage('userInfo').token
                api.ajax({
                    url: ajaxRoute.center,
                    method: 'post',
                    data: {
                        values: {
                            token: token,
                        }
                    }
                }, function (res, err) {
                    // alert(JSON.stringify(res));
                    if (res.code == 1) {
                        console.log(JSON.stringify(res));
                        console.log("erweimane");
                        that.erweima = res.data.kefu
                        that.avatar = res.data.userinfo.avatar
                        that.$nextTick(function () {
                            // alert('v-for渲染已经完成')
                            // cacheDataImg()
                        })
                    } else {
                        api.hideProgress();
                        api.toast({msg: res.msg, location: 'middle'});
                    }
                });
            },
        },
        filters: {
            filtersImg: function (img) {
                var imgs = ajaxUrl + '/' + img
                console.log(imgs)
                return imgs;
            }
        }
    })
</script>
